<?php
namespace Admin\Controller;

class ResourceController extends CommonController{
    
    public function index(){
        $where = array();
        $where['type'] = I('get.type');
        $where['pid']  = 0;
        if(I('get.keywords')){
            $where['name'] = array('like','%'.I('get.keywords').'%');
        }
        $dataPage = D($this->controller)->getPager($where);
        $this->assign('list',$dataPage['data']);
        $this->assign('page',$dataPage['page']);
        $this->display();
    }
    
    //获取剂量
    public function getVolArr(){
        $arr = array();
        $arr = D($this->controller)->where(array('pid'=>I('request.pid')))->select();
        echo json_encode($arr);die;
    }
    
}